import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);
export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/swap/countdown',
    },
    {
      path: '/homePage',
      name: 'homePage',
      redirect: '/swap/index',
      component: () => import(/* webpackChunkName: "homePage" */ './view/HomePage'),
      children: [
        {
          path: '/swap/index',
          name: 'swap-index',
          component: () => import(/* webpackChunkName: "swap-index" */ './view/swap/Index'), // 兑换
          meta: { group: 'swap' },
        },
        {
          path: '/swap/countdown',
          name: 'swap-countdown',
          component: () => import(/* webpackChunkName: "swap-countdown" */ './view/swap/CountDown'), // 兑换
          meta: { group: 'swap' },
        },
        {
          path: '/swap/end',
          name: 'swap-end',
          component: () => import(/* webpackChunkName: "swap-end" */ './view/swap/End'), // 兑换
          meta: { group: 'swap' },
        },
      ],
    },
  ],
});
